package com.youth.youthservice.service;

import com.youth.commonutils.R;
import com.youth.youthservice.entity.EduChapter;
import com.youth.youthservice.entity.chapter.ChapterVo;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 * 课程 服务类
 * </p>
 *
 * @author CM
 * @since 2023-4-30
 */
public interface EduChapterService extends IService<EduChapter> {

    /*根据课程ID查询某一课程的章节*/
    List<ChapterVo> getChapterByCourseId(String courseId);

    /*为课程添加章节，需要检查是否又重名*/
    R addChapter(EduChapter chapter);

    /*根据章节id删除课程对应章节，同时要删除其下的小节*/
    R deleteById(String chapterId);
}
